<%-- 
    Document   : Employee
    Created on : May 9, 2012, 9:28:43 AM
    Author     : Thanh Luan
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<%@taglib prefix="rich" uri="http://richfaces.org/rich" %>
<%@taglib prefix="a4j" uri="http://richfaces.org/a4j" %>

<html>
    <head>

        <script type="text/javascript" language="javascript" src="../scripts/jQuery/jquery.fancybox-1.3.4.pack.js"></script>
        <link rel="stylesheet" type="text/css" href="../scripts/tabs/slidingtabs-horizontal.css">
        <script type="text/javascript" src="../scripts/tabs/slidetab.js"></script>
        <link rel="stylesheet" type="text/css" href="../css/thickbox.css"/>
        <link rel="stylesheet" type="text/css" href="../css/dropdown.css"/>
        <script type="text/javascript" language="javascript" src="../scripts/jQuery/thickbox.js"></script>
        <script type="text/javascript">
            $j(document).ready(function() {
                initThickBox('.thickbox');
                $j(".department2").live("click", function() {

                    fh200 = $j(".donvi").attr("lang");
                    fn850 = $j(this).attr("lang");
                    fn450 = $j(".department1").attr("lang");
                    emp = $j('.cbx_editEmp').children("option:selected").val();
                    fis = $j('.fis').attr('lang');
                    //   showPleaseWait(); 
                    $j.post("N450_N850.jsp?&action=group&fh200=" + fh200 + "&fn450=" + fn450 + "&fn850=" + fn850, function(data) {
                        if (data != null) {
                            window.location.href = "project.jsp?action=loadproject&fis=" + fis;
                            //       hidePleaseWait();        
                        }
                    });
                });
                $j('.loadproject').live('click', function() {
                    fis = $j(this).attr('lang');
                    emp = $j('.cbx_editEmp').children("option:selected").val();
                    showPleaseWait();
                    window.location.href = "project.jsp?action=loadproject&fis=" + fis;
                });
                $j(".department3").live("click", function() {
                    fh200 = $j(".donvi").attr("lang");
                    fn850 = $j(this).attr("lang");
                    fn450 = $j(".department1").attr("lang");
                    emp = $j('.cbx_editEmp').children("option:selected").val();
                    fis = $j('.fis').attr('lang');
                    $j.post("N450_N850.jsp?&action=group&fh200=" + fh200 + "&fn450=" + fn450 + "&fn850=" + fn850, function(data) {
                        if (data != null) {
                            window.location.href = "project.jsp?action=loadproject&fis=" + fis;
                        }
                    });
                });
                $j(".cbx_editEmp").live("change", function() {
                    fn850 = $j(".department2").attr("lang");
                    emp = $j('.cbx_editEmp').children("option:selected").val();
                    fis = $j('.fis').attr('lang');
                    showPleaseWait();
                    $j.post("N450_N850.jsp?fn850=" + fn850 + "&emp=" + emp, function(data) {
                        if (data != null) {
                            window.location.href = "project.jsp?action=loadproject&fis=" + fis;
                            hidePleaseWait();
                        }
                    });
                });
                $j('.text_search').live('keyup', function() {
                    if ($j('.text_search').val() == "") {
                        $j('.noteRow').show();
                        $j('.close').trigger('click');

                    } else {
                        $j('.close').trigger('click');
                        $j('.noteRow').hide();
                        $j('.noteRow').each(function() {
                            html = $j(this).html();
                            if (ununicode(html).indexOf(ununicode($j('.text_search').val())) > -1) {
                                $j(this).show();
                            } else {
                                $j(this).hide();
                            }
                        });
                    }

                });
                $j('.icondots').live('hover', function() {
                    $j(this).next('.addgroup').css('display', 'block');
                    $j(this).next('.addgroup').css('z-index', '999');
                });
                $j('.icondots').live('mouseout', function() {
                    $j(this).next('.addgroup').css('display', 'none');
                });
                $j('.search_boxp').hide();
                $j('.sidebar_search').live('click', function() {
                    $j('.search_boxp').hide();
                    if ($j(this).next().hasClass('active')) {

                        $j('.search_boxp').removeClass('active');
                    } else {

                        $j('.search_boxp').removeClass('active');
                        $j(this).next().addClass('active');
                        $j(this).next().show();
                    }
                });
            });
        </script>

    </head>
    <body>
        <div id="content">
            <div id="menutop_top">
                 <div class="div_search_menutop">
                     <div class="item_search">
                       
                          <h:inputText onfocus="if(this.value=='search') this.value='';" style="float:left;" value="search"/>
                          <div style="float:left;border: 1px solid #50678A;"> <h:graphicImage style="float:left;" value="../images1/btn_search.png"/></div>
                     </div>
                   
                </div>
                <div class="icon_action">
                    <h:outputLink rendered="#{loginSession.right.EMP_LST_DLE}" value="employeeDelete.jsp">
                        <img src="../images1/add.png" title="Danh sách nhiên viên đã nghỉ"/>
                    </h:outputLink>
                </div>
                <div class="icon_action">
                     <h:outputLink rendered="#{loginSession.right.EMP_LST_DLE}" value="employeeDelete.jsp">
                        <img src="../images1/add.png" title="Danh sách nhiên viên đã nghỉ"/>
                    </h:outputLink>
                </div>
                <div class="icon_action">
                     <h:outputLink rendered="#{loginSession.right.EMP_LST_DLE}" value="employeeDelete.jsp">
                        <img src="../images1/add.png" title="Danh sách nhiên viên đã nghỉ"/>
                    </h:outputLink>
                </div>
               
            </div>

            <div id="menutop">
                <div class="dropdown">
                    <div class="select_choise">
                        <a href="#"><span>Khu vực</span></a>
                    </div>
                    <div class="select_hidden">
                        <ul>

                            <li><a href="#"><span>Filter Cấp 3</span></a></li>
                            <li><a href="#"><span>Filter Cấp 3</span></a></li>
                        </ul>
                    </div>
                </div>
                <h:panelGroup rendered="#{loginSession.right.DAB_LST_PAR}">
                    <div class="dropdown">
                        <div class="select_choise">
                            <a href="#">
                                <span class="department2" lang="<h:outputText value="#{n450_n850.fn850}"/>">
                                    <h:outputText rendered="#{n450_n850.fn850 !=0}" value="#{n450_n850.nv851}"/>
                                    <h:outputText rendered="#{n450_n850.fn850 ==0}" value="Tất cả"/>
                                </span>
                            </a>

                        </div>
                        <div class="select_hidden departmentlistN850">

                            <ul>
                                <li><a href="#"><span class="department3" lang="<h:outputText value="0"/>">
                                            <h:outputText value="Tất cả"/>
                                        </span></a></li>                          


                                <a4j:repeat value="#{n450_n850.listComb850}" var="item">
                                    <li><a href="#"><span class="department2" lang="<h:outputText value="#{item.value}"/>">
                                                <h:outputText value="#{item.label}"/>
                                            </span></a></li> 
                                        </a4j:repeat>
                            </ul>
                        </div>
                    </div>
                </h:panelGroup>
            </div>
            <div style="width: 100%;">
                <div class="headerdivtable">
                    <div class="itemheaderdivtable_center" style="width: 2%;">
                        <h:outputText value="NUM"/>
                    </div>
                    <div class="itemheaderdivtable_center" style="width: 3%;">
                        <h:outputText value="CHI TIẾT"/>
                    </div>
                    <div class="itemheaderdivtable_center" style="width: 6%;">
                        <h:outputText value="MORE"/>
                    </div>
                    <div class="itemheaderdivtable_center" style="width: 6%;">
                        <h:outputText value="CHỨC NĂNG" />
                    </div>
                    <%--  <div class="itemheaderdivtable_center" style="width: 6%;">
                          <h:outputText value="XÉT DUYỆT"/>
                      </div> --%>
                    <div class="itemheaderdivtable_center" style="width: 5%;">
                        <h:outputText value="GIẢM GIÁ"/>
                    </div>
                    <div class="itemheaderdivtable_center" style="width: 6%;">
                        <h:outputText value="THANH TOÁN"/>
                    </div>
                    <div class="itemheaderdivtable_center" style="width: 5%;">
                        <h:outputText value="PRINT"/>
                    </div>
                    <div class="itemheaderdivtable_center" style="width: 10%;">
                        <h:outputText value="HỌ TÊN"/>
                    </div>
                    <div class="itemheaderdivtable_center" style="width: 6%;">
                        <h:outputText value="CODE TOUR"/>
                    </div>

                    <div class="itemheaderdivtable_center" style="width: 5%;">
                        <h:outputText value="TIỀN TỆ" />
                    </div>
                    <div class="itemheaderdivtable_center" style="width: 6%;">
                        <h:outputText value="SỐ TIỀN"/>
                    </div>
                    <div class="itemheaderdivtable_center" style="width: 6%;">
                        <h:outputText value="GIẢM GIÁ %"/>
                    </div>
                    <div class="itemheaderdivtable_center" style="width: 6%;">
                        <h:outputText value="GIẢM GIÁ $"/>
                    </div>
                    <div  class="itemheaderdivtable_center" style="width: 6%;">
                        <h:outputText value="ĐÃ THU" />
                    </div>
                    <div class="itemheaderdivtable_center" style="width:6%;">
                        <h:outputText  value="CÒN THIẾU"/>
                    </div>
                    <div class="itemheaderdivtable_center" style="width:4%;">
                        <h:outputText  value="VAT %"/>
                    </div>
                    <div class="itemheaderdivtable_center" style="width:6%;">
                        <h:outputText  value="VAT $"/>
                    </div>


                </div>

                <div class="headerdivtable_over">
                    <a4j:repeat  value="#{T950Bean.listT950forTour}" var="item" rowKeyVar="index">    
                        <div class="headerdivtable_bootom <h:outputText rendered="#{index%2 !=0}"  value="headerdivtable_tr"/>">
                            <div class="itemheaderdivtable_center " style="width: 2%;color:#0055A6;">
                                <h:outputText style="font-weight:bold;" value="#{index+1}" >
                                    <f:convertNumber  pattern="##000"></f:convertNumber>
                                </h:outputText>
                            </div>
                            <div class="itemheaderdivtable_center" style="width: 3%;">


                                <h:graphicImage styleClass="showhistory upitemtory#{item.pt950}" lang="#{item.pt950}"  title="Xem đợt thanh toán" value="../images/history.png"/>


                            </div>
                            <div class="itemheaderdivtable_center" style="width: 6%;">
                                <div class="viewfo">More
                                    <div class="itemviewfo" style="display: none;color:#fff;text-align: left;">
                                        <div style="float:left;width: 100%">Ngày xác nhận : <h:outputText value="#{item.td966}"></h:outputText>--<h:outputText value="#{item.tv967}"/>  </div>
                                        <div style="float:left;width: 100%">Ngày kiểm duyệt : <h:outputText value="#{item.td964}"></h:outputText>--<h:outputText value="#{item.tv965}"/> </div>
                                        <div style="float:left;width: 100%">Ngày lập phiếu :<h:outputText value="#{item.td953}"><f:convertDateTime pattern="dd/MM/yyyy"/></h:outputText> </div>
                                            <div style="float:left;width: 100%">Mục đích : Thu tiền người tham gia Tour</div>
                                        </div>
                                    </div>
                                </div>
                                <div class="itemheaderdivtable_center graphic" style="width: 6%;">
                                <h:outputLink    value="adddebt.jsp?action=editchildPt950&pt950=#{item.pt950}&fn100=#{item.fn100}&fv050=#{item.fv050}&height=282px&width=345px" styleClass="fancybox">
                                    <img src="../images/edit.png" alt="edit" title="edit"/>
                                </h:outputLink>



                            </div>

                            <div class="itemheaderdivtable_center" style="width: 5%;">
                                <h:outputLink value="edisaleTour.jsp?action=getsaleTour&pt950=#{item.pt950}&fn100=#{item.fn100}" styleClass="fancybox">
                                    <h:graphicImage  title="Giảm giá" value="../images/sale.png"/>
                                </h:outputLink>
                            </div>
                            <div class="itemheaderdivtable_center" style="width: 6%;">
                                <h:outputLink  value="adddebt.jsp?action=addchildPt950&pt950=0&ft950=#{item.pt950}&fn100=#{item.fn100}&fv050=#{item.fv050}&tv957=#{item.tv957}&page=debt.jsp&height=282px&width=345px" styleClass="fancybox" id="fancybox">
                                    <h:graphicImage title="Lập phiếu thu/chi" value="../images/add_tab.png"/>
                                </h:outputLink>
                            </div>
                            <div class="itemheaderdivtable_center" style="width: 5%;">
                                <h:commandButton actionListener="#{T950Bean.exportExcel()}"  value="Export">
                                    <f:param value="#{v030Controller.FV050}" name="fv050"/>

                                </h:commandButton>
                                <%--   <h:outputLink   value="documentView_infanial.jsp?action=getinfomationEmp&pt950=#{item.pt950}">
                                      <img  src="../images/docs_icon.png" height="15px" width="15px" title="Xem phiếu"/> 
                                  </h:outputLink>
                                    <h:commandButton title="Export Word File" value="Print" onclick="showPleaseWait();" action="#{T950Bean.printWord}"/> --%>
                            </div>
                            <div class="itemheaderdivtable_left " style="width: 10%;">
                                <h:outputText value="#{item.hoten}"/>
                            </div>
                            <div class="itemheaderdivtable_left " style="width: 6%;">
                                <h:outputText value="#{item.tv957}"/>
                            </div>

                            <div class="itemheaderdivtable_center " style="width: 5%;">
                                <h:outputText value="#{item.money}"/> 
                            </div>
                            <div  class="itemheaderdivtable_left " style="width: 6%;">
                                <h:outputText style="color:red;font-weight:bold;" value="#{item.tn951Str}"/>
                            </div>
                            <div  class="itemheaderdivtable_left " style="width: 6%;">
                                <h:outputText style="color:red;font-weight:bold;" value="#{item.tn972}"/>
                            </div>
                            <div  class="itemheaderdivtable_left " style="width: 6%;">
                                <h:outputText style="color:red;font-weight:bold;" value="#{item.tientram}"/>
                            </div>
                            <%--    <div class="itemheaderdivtable_left " style="width: 8%;">
                            <h:outputText  value="#{item.kv301}"/>
                        </div>--%>

                            <div class="itemheaderdivtable_left " style="width:6%;">
                                <h:outputText style="color:red;font-weight:bold;" value="#{item.dathuStr}"/>
                            </div>
                            <div class="itemheaderdivtable_left " style="width:6%;">
                                <h:outputText style="color:red;font-weight:bold;" value="#{item.conthieuStr}"/>
                            </div>
                            <div class="itemheaderdivtable_left " style="width:4%;">
                                <h:outputText style="color:red;font-weight:bold;"  value="#{item.tn974}"/>
                            </div>
                            <div class="itemheaderdivtable_left " style="width:6%;">
                                <h:outputText style="color:red;font-weight:bold;" value="#{item.tn975}"/>
                                <%--   <h:outputText  value="#{item.td953}"><f:convertDateTime pattern="dd/MM/yyyy"/></h:outputText>
                                --%>
                            </div>

                        </div>
                        <div class="showitemHistory">

                        </div>
                    </a4j:repeat>
                </div>
            </div>
        </div>

    </body>
</html>
